// components/song-item/index.js
import {musicStore} from '../../store/index'
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    songInfo:{
      type:Object,
      value:{}
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    playMusic(event){
      const id = event.currentTarget.dataset.id
      wx.navigateTo({
        url: `/pages/music-detail/index?id=${id}`,
      })
      musicStore.dispatch('playMusicWithIdAction',id)
    }
  }
})
